
    Pfbj              	       |   d Z ddlZddlZddlZddlmZ  ed          d ed          d ed          d	 ed
          diZ ed          d ed          diZd Z	d Z
ddZddZ	 	 	 	 ddZ	 	 	 	 ddZ ej        d          j        Z	 	 	 	 	 	 d dZ	 	 	 	 	 	 d dZd Zd Zd!dZd!dZ	 	 d"dZ	 	 d"dZdS )#a  Additional factory functions for common QR codes.

Aside from  :py:func:`make_epc_qr`, the factory functions return a QR code
with the minimum error correction level "L" (or better).

To create a (Micro) QR code which should use a specific error correction level
or version etc., use the "_data" factory functions which return a string which
can be used as input for :py:func:`segno.make()`.
    N)quote\z\\;z\;:z\:"z\",z\,c                 P    t          |                               t                    S z~    Escapes ``\``, ``;``, ``"`` and ``:`` in the provided string.

    :param str s: The string to escape.
    :rtype str
    )str	translate_MECARD_ESCAPEss    ?/var/www/html/env/lib/python3.11/site-packages/segno/helpers.py_escape_mecardr   &   s     q66N+++    c                 P    t          |                               t                    S r
   )r   r   _VCARD_ESCAPEr   s    r   _escape_vcardr   0   s     q66M***r   Fc                     t           }d}|r2|d                    |dk    r|                                n|          z  }|d ||            dz  }||d ||           dz  }||rdndz  }|S )	a      Creates WIFI configuration string.

    :param str ssid: The SSID of the network.
    :param password: The password.
    :type password: str or None
    :param security: Authentication type; the value should be "WEP" or "WPA".
            Set to ``None`` to omit the value.
            "nopass" is equivalent to setting the value to ``None`` but in
            the former case, the value is not omitted.
    :type security: str or None
    :param bool hidden: Indicates if the network is hidden (default: ``False``)
    :rtype: str
    zWIFI:zT:{0};nopasszS:r   NzP:zH:true;)r   formatupper)ssidpasswordsecurityhiddenescapedatas         r   make_wifi_datar    :   s     FD XH4H4H 0 0 0hWWW     D(VVH%%(((((IIS(DKr   c                 J    t          j        t          | |||                    S )a(      Creates a WIFI configuration QR code.

    :param str ssid: The SSID of the network.
    :param password: The password.
    :type password: str or None
    :param security: Authentication type; the value should be "WEP" or "WPA".
            Set to ``None`` to omit the value.
            "nopass" is equivalent to setting the value to ``None`` but in
            the former case, the value is not omitted.
    :type security: str or None
    :param bool hidden: Indicates if the network is hidden (default: ``False``)
    :rtype: segno.QRCode
    )segnomake_qrr    )r   r   r   r   s       r   	make_wifir$   T   s"     =h&IIJJJr   c                 j   fd}t           d |            dg}|r"|                    d |           d           |                     |d|                     |                     |d|                     |                     |d|                     |r"|                    d |           d           |r@	 |                    d	          }n# t          $ r Y nw xY w|                    d
| d           |                     |d|                     |	|
|||||f}t          |          r+fd|D             }|                     dj        |            |r"|                    d |           d           |                    d           d                    |          S )a      Creates a string encoding the contact information as MeCard.

    :param str name: Name. If it contains a comma, the first part
            is treated as lastname and the second part is treated as forename.
    :param reading: Designates a text string to be set as the kana name in the phonebook
    :type reading: str or None
    :param email: E-mail address. Multiple values are allowed.
    :type email: str, iterable of strings, or None
    :param phone: Phone number. Multiple values are allowed.
    :type phone: str, iterable of strings, or None
    :param videophone: Phone number for video calls. Multiple values are allowed.
    :type videophone: str, iterable of strings, or None
    :param memo: A notice for the contact.
    :type memo: str or None
    :param nickname: Nickname.
    :type nickname: str or None
    :param birthday: Birthday. If a string is provided, it should encode the date as YYYYMMDD value.
    :type birthday: str, datetime.date or None
    :param url: Homepage. Multiple values are allowed.
    :type url: str, iterable of strings, or None
    :param pobox: P.O. box (address information).
    :type pobox: str or None
    :param roomno: Room number (address information).
    :type roomno: str or None
    :param houseno: House number (address information).
    :type houseno: str or None
    :param city: City (address information).
    :type city: str or None
    :param prefecture: Prefecture (address information).
    :type prefecture: str or None
    :param zipcode: Zip code (address information).
    :type zipcode: str or None
    :param country: Country (address information).
    :type country: str or None
    :rtype: str
    c                 \     |sdS t          |t                    r|f} fd|D             S )N c                 N    g | ]!}d                       |                    "S )z{0}:{1};r   .0ir   names     r   
<listcomp>z=make_mecard_data.<locals>.make_multifield.<locals>.<listcomp>   s1    @@@q
!!$q		22@@@r   
isinstancer   r-   valr   s   ` r   make_multifieldz)make_mecard_data.<locals>.make_multifield   sG     	2c3 	&C@@@@@C@@@@r   z	MECARD:N:r   zSOUND:TELTELAVEMAIL	NICKNAME:z%Y%m%dBDAY:URLc                 *    g | ]} |pd           S  r'   r+   r,   r   s     r   r.   z$make_mecard_data.<locals>.<listcomp>   %    <<<FF17OO<<<r   z ADR:{0},{1},{2},{3},{4},{5},{6};zMEMO:r<   )r   appendextendstrftimeAttributeErroranyr   join)r-   readingemailphone
videophonememonicknamebirthdayurlpoboxroomnohousenocity
prefecturezipcodecountryr3   r   adr_propertiesadr_datar   s                       @r   make_mecard_datarV   f   s&   RA A A A A F't'''(D 1/VVG__///000KKu--...KK44555KK//000 53x 0 0333444 )	((22HH 	 	 	D	'H'''(((KKs++,,,VWdJQN
> J<<<<^<<<=6=xHIII -+FF4LL+++,,,KK774==s   C 
C)(C)c                     t          j        t          di d| d|d|d|d|d|d|d|d	|d
|	d|
d|d|d|d|d|          S )a      Returns a QR code which encodes a `MeCard <https://en.wikipedia.org/wiki/MeCard>`_

    :param str name: Name. If it contains a comma, the first part
            is treated as lastname and the second part is treated as forename.
    :param reading: Designates a text string to be set as the kana name in the phonebook
    :type reading: str or None
    :param email: E-mail address. Multiple values are allowed.
    :type email: str, iterable of strings, or None
    :param phone: Phone number. Multiple values are allowed.
    :type phone: str, iterable of strings, or None
    :param videophone: Phone number for video calls. Multiple values are allowed.
    :type videophone: str, iterable of strings, or None
    :param memo: A notice for the contact.
    :type memo: str or None
    :param nickname: Nickname.
    :type nickname: str or None
    :param birthday: Birthday. If a string is provided, it should encode the date as YYYYMMDD value.
    :type birthday: str, datetime.date or None
    :param url: Homepage. Multiple values are allowed.
    :type url: str, iterable of strings, or None
    :param pobox: P.O. box (address information).
    :type pobox: str or None
    :param roomno: Room number (address information).
    :type roomno: str or None
    :param houseno: House number (address information).
    :type houseno: str or None
    :param city: City (address information).
    :type city: str or None
    :param prefecture: Prefecture (address information).
    :type prefecture: str or None
    :param zipcode: Zip code (address information).
    :type zipcode: str or None
    :param country: Country (address information).
    :type country: str or None
    :rtype: segno.QRCode
    r-   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   r'   )r"   r#   rV   )r-   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   s                   r   make_mecardrX      s    R =) ; ; ;tt ;WW ;05;=BU;5?Z;FJd; 4<8; GOh; /2c	; :?	; HNv	;
 3:';
 AE; 6@Z; JQ; 3:'; < < <r   zB^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:(?:-?\d{2}:\d{2})|Z)?)?$c                 (   fd}t           ddd|  d |           g}|r1|                    d                     |                               |                     |d|                     |                     |d|                     |                     |d	|                     |                     |d
|                     |                     |d|                     |                     |d|                     |                     |d|                     |                     |d|	                     |                     |d|                     |                     |d|                     |r!|                    d |                      |
|||||f}t	          |          r+fd|D             }|                     dj        |            |rr	 |                    d          }n# t          $ r Y nw xY wt          |t                    rt          |          st          d          |                    d|            |r|r|r|st          d          |r|r|                    d| d|            |r!|                    d |                      |r!|                    d |                      |rr	 |                    d          }n# t          $ r Y nw xY wt          |t                    rt          |          st          d          |                    d|            |                    d           |                    d           d                     |          S )!a
      Creates a string encoding the contact information as vCard 3.0.

    Only a subset of available `vCard 3.0 properties <https://tools.ietf.org/html/rfc2426>`
    is supported.

    :param str name: The name. If it contains a semicolon, , the first part
            is treated as lastname and the second part is treated as forename.
    :param str displayname: Common name.
    :param email: E-mail address. Multiple values are allowed.
    :type email: str, iterable of strings, or None
    :param phone: Phone number. Multiple values are allowed.
    :type phone: str, iterable of strings, or None
    :param fax: Fax number. Multiple values are allowed.
    :type fax: str, iterable of strings, or None
    :param videophone: Phone number for video calls. Multiple values are allowed.
    :type videophone: str, iterable of strings, or None
    :param memo: A notice for the contact.
    :type memo: str or None
    :param nickname: Nickname.
    :type nickname: str or None
    :param birthday: Birthday. If a string is provided, it should encode the
                     date as ``YYYY-MM-DD`` value.
    :type birthday: str, datetime.date or None
    :param url: Homepage. Multiple values are allowed.
    :type url: str, iterable of strings, or None
    :param pobox: P.O. box (address information).
    :type pobox: str or None
    :param street: Street address.
    :type street: str or None
    :param city: City (address information).
    :type city: str or None
    :param region: Region (address information).
    :type region: str or None
    :param zipcode: Zip code (address information).
    :type zipcode: str or None
    :param country: Country (address information).
    :type country: str or None
    :param org: Company / organization name.
    :type org: str or None
    :param lat: Latitude.
    :type lat: float or None
    :param lng: Longitude.
    :type lng: float or None
    :param source: URL where to obtain the vCard.
    :type source: str or None
    :param rev: Revision of the vCard / last modification date.
    :type rev: str, datetime.date or None
    :param title: Job Title. Multiple values are allowed.
    :type title: str, iterable of strings, or None
    :param photo_uri: Photo URI. Multiple values are allowed.
    :type photo_uri: str, iterable of strings, or None
    :param cellphone: Cell phone number. Multiple values are allowed.
    :type cellphone: str, iterable of strings, or None
    :param homephone: Home phone number. Multiple values are allowed.
    :type homephone: str, iterable of strings, or None
    :param workphone: Work phone number. Multiple values are allowed.
    :type workphone: str, iterable of strings, or None
    :rtype: str
    c                 \     |sdS t          |t                    r|f} fd|D             S )Nr'   c                 N    g | ]!}d                       |                    "S )z{0}:{1}r)   r*   s     r   r.   z<make_vcard_data.<locals>.make_multifield.<locals>.<listcomp>-  s1    ???a	  vvayy11???r   r/   r1   s   ` r   r3   z(make_vcard_data.<locals>.make_multifield(  sG     	2c3 	&C?????3????r   zBEGIN:VCARDzVERSION:3.0zN:zFN:zORG:{0}r6   r4   zTEL;TYPE=FAXzTEL;TYPE=VIDEOzTEL;TYPE=CELLzTEL;TYPE=HOMEzTEL;TYPE=WORKr9   TITLEzPHOTO;VALUE=urir7   c                 *    g | ]} |pd           S r;   r'   r=   s     r   r.   z#make_vcard_data.<locals>.<listcomp>C  r>   r   zADR:{0};;{1};{2};{3};{4};{5}z%Y-%m-%dzG"birthday" does not seem to be a valid date or date/time representationr8   zBIncomplete geo information, please specify latitude and longitude.zGEO:r   zSOURCE:zNOTE:zB"rev" does not seem to be a valid date or date/time representationzREV:z	END:VCARDr<   z
)r   r?   r   r@   rC   rA   rB   r0   r   _looks_like_datetime
ValueErrorrD   )r-   displaynamerF   rG   faxrH   rI   rJ   rK   rL   rM   streetrP   regionrR   rS   orglatlngsourcerevtitle	photo_uri	cellphone	homephone	workphoner3   r   rT   rU   r   s                                 @r   make_vcard_datarn      s@   D@ @ @ @ @ F=KK'&&%%'')D  3I$$VVC[[11222KK//000KKu--...KK44555KK 0*==>>>KK;;<<<KK;;<<<KK;;<<<KKs++,,,KK//000KK 19==>>> 42x 0 022333VT67GDN
> F<<<<^<<<9298DEEE (	((44HH 	 	 	D	(C(( 	h0DX0N0N 	hfggg&H&&'''
 _3 _# _c _]^^^
 (s (&3&&&&''' 0.ffVnn../// ,*FF4LL**+++
 "	,,z**CC 	 	 	D	#s## 	c+?+D+D 	cabbbL3LL!!!KKKKOOO;;ts$   4H
 

HH$K: :
LLc                     t          j        t          | |fi d|d|d|d|d|d|d|d|	d	|
d
|d|d|d|d|d|d|d|d|d|d|d|d|d|d|          S )a
      Creates a QR code which encodes a `vCard <https://en.wikipedia.org/wiki/VCard>`_
    version 3.0.

    Only a subset of available `vCard 3.0 properties <https://tools.ietf.org/html/rfc2426>`
    is supported.

    :param str name: The name. If it contains a semicolon, , the first part
            is treated as lastname and the second part is treated as forename.
    :param str displayname: Common name.
    :param email: E-mail address. Multiple values are allowed.
    :type email: str, iterable of strings, or None
    :param phone: Phone number. Multiple values are allowed.
    :type phone: str, iterable of strings, or None
    :param fax: Fax number. Multiple values are allowed.
    :type fax: str, iterable of strings, or None
    :param videophone: Phone number for video calls. Multiple values are allowed.
    :type videophone: str, iterable of strings, or None
    :param memo: A notice for the contact.
    :type memo: str or None
    :param nickname: Nickname.
    :type nickname: str or None
    :param birthday: Birthday. If a string is provided, it should encode the
                     date as ``YYYY-MM-DD`` value.
    :type birthday: str, datetime.date or None
    :param url: Homepage. Multiple values are allowed.
    :type url: str, iterable of strings, or None
    :param pobox: P.O. box (address information).
    :type pobox: str or None
    :param street: Street address.
    :type street: str or None
    :param city: City (address information).
    :type city: str or None
    :param region: Region (address information).
    :type region: str or None
    :param zipcode: Zip code (address information).
    :type zipcode: str or None
    :param country: Country (address information).
    :type country: str or None
    :param org: Company / organization name.
    :type org: str or None
    :param lat: Latitude.
    :type lat: float or None
    :param lng: Longitude.
    :type lng: float or None
    :param source: URL where to obtain the vCard.
    :type source: str or None
    :param rev: Revision of the vCard / last modification date.
    :type rev: str, datetime.date or None
    :param title: Job Title. Multiple values are allowed.
    :type title: str, iterable of strings, or None
    :param photo_uri: Photo URI. Multiple values are allowed.
    :type photo_uri: str, iterable of strings, or None
    :param cellphone: Cell phone number. Multiple values are allowed.
    :type cellphone: str, iterable of strings, or None
    :param homephone: Home phone number. Multiple values are allowed.
    :type homephone: str, iterable of strings, or None
    :param workphone: Work phone number. Multiple values are allowed.
    :type workphone: str, iterable of strings, or None
    :rtype: segno.QRCode
    rF   rG   ra   rH   rI   rJ   rK   rL   rM   rb   rP   rc   rR   rS   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   )r"   r#   rn   )r-   r`   rF   rG   ra   rH   rI   rJ   rK   rL   rM   rb   rP   rc   rR   rS   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   s                             r   
make_vcardrp   b  sO   F ={ > > >%% >/4u>:=#>4>J>EIT> 3;(> FNX> .1S	> 9>	> GMf	>
 /3d>
 <B6> 29> CJ'> .1S> 7:c> @Cs> 17> =@C> HMu> 4=9> 4=9> 4=9> 4=9> ? ? ?r   c                 <    d }d ||            d ||           S )zt    Creates a geo location URI.

    :param float lat: Latitude
    :param float lng: Longitude
    :rtype: str
    c                 x    d                     |                               d                              d          S )Nz{0:.8f}0.)r   rstrip)fs    r   float_to_strz#make_geo_data.<locals>.float_to_str  s2    ""))#..55c:::r   zgeo:r   r'   )re   rf   rw   s      r   make_geo_datarx     s=    ; ; ; :,,s##99ll3&7&7999r   c                 F    t          j        t          | |                    S )z    Returns a QR code which encodes geographic location using the ``geo`` URI
    scheme.

    :param float lat: Latitude
    :param float lng: Longitude
    :rtype: segno.QRCode
    )r"   r#   rx   )re   rf   s     r   make_georz     s     =sC00111r   c                 ,   d }d}dg}| st          d          |                    d                     ||                                d|fd|ffD ]Q\  }}	 ||	          }
|
r?|                    d                    ||d                    |
                               d	}Rd
|fd|ffD ]S\  }}	|	J|                    d                    ||t	          |	                    d                                         d	}Td                    |          S )a|      Creates either a simple "mailto:" URL or complete e-mail message with
    (blind) carbon copies and a subject and a body.

    :param to: The email address (recipient). Multiple values are allowed.
    :type to: str or iterable of strings
    :param cc: The carbon copy recipient. Multiple values are allowed.
    :type cc: str, iterable of strings, or None
    :param bcc: The blind carbon copy recipient. Multiple values are allowed.
    :type bcc: str, iterable of strings, or None
    :param subject: The subject.
    :type subject: str or None
    :param body: The message body.
    :type body: str or None
    :rtype: str
    c                 X    | sdS t          | t                    r| fS t          |           S )Nr'   )r0   r   tuple)r2   s    r   multiz#make_make_email_data.<locals>.multi  s4     	2c3 	6MSzzr   ?zmailto:z"to" must not be empty or Noner   ccbccz
{0}{1}={2}&subjectbodyNutf-8r<   )r_   r?   rD   r   r   encode)tor   r   r   r   r~   delimr   keyr2   valss              r   make_make_email_datar     s:   "   E;D ;9:::KKr##$$$BZ%.  SuSzz 	KK++E3GGHHHE)FD>:  S?KK++E3cjj>Q>Q8R8RSSTTT774==r   c           	      N    t          j        t          | ||||                    S )a      Encodes either a simple e-mail address or a complete message with
    (blind) carbon copies and a subject and a body.

    :param to: The email address (recipient). Multiple values are allowed.
    :type to: str or iterable of strings
    :param cc: The carbon copy recipient. Multiple values are allowed.
    :type cc: str, iterable of strings, or None
    :param bcc: The blind carbon copy recipient. Multiple values are allowed.
    :type bcc: str, iterable of strings, or None
    :param subject: The subject.
    :type subject: str or None
    :param body: The message body.
    :type body: str or None
    :rtype: segno.QRCode
    r   r   r   r   r   )r"   r#   r   r   s        r   
make_emailr     s;    " =-6=DJ J J K K Kr   c           
      	   d}t          j        d          }	t          j        d          }
|r|                                n|}|r|                                n|}|r|                                n|}| r|                                 n| } |t	          |t
                    r]	 |                    |                                          dz   }n# t          $ r$ t          d	                    ||                    w xY wt	          |t                    rd|cxk    rt          |          k    s$n t          d	                    |                    |s|r|r|rt          d          |rKd	t          |          cxk     rd
k    s1n t          d	                    t          |                              |rKd	t          |          cxk     rdk    s1n t          d	                    t          |                              | d	t          |           cxk     rdk    s$n t          d	                    |                     |dt          |          cxk     rdk    s$n t          d	                    |                    |r3t          |          dvr"t          d	                    |                    |r5t          |          dk    r"t          d	                    |                    t          j        |          }|	|cxk    r|
k    s%n t          d	                    |	|
                    dddd|pd| |d	                    |                              d                              d          |pd|pdg
}|r|                    |           d                    |          }|dn|}|d	k     rHt          |dd         d !          D ].\  }}	 |                    |           |} n# t           $ r Y +w xY w|d	k     rd}t          |          |d <   d                    |                              ||dz
                     }t          |          d"k    r/t          d#	                    t          |                              |S )$z    Validates the input and creates the data for an EPC QR Code.

    DOES NOT belong to the public API, kept separate from make_epc_qr to apply
    tests on the raw data.

    See :py:func:`make_epc_qr` for a description of the parameters.
    )r   z
iso-8859-1z
iso-8859-2z
iso-8859-4z
iso-8859-5z
iso-8859-7ziso-8859-10ziso-8859-15z0.01z999999999.99N   z&Invalid encoding "{0}", use one of {1}z9Invalid encoding number only 1 .. 8 are allowed, got "{}"zBEither a text or a creditor reference (ISO 11649) must be providedr      z7Invalid text, max. 140 characters are allowed, got "{}"#   zPInvalid creditor reference (ISO 11649), max. 35 characters are allowed, got "{}"F   z6Invalid name, max. 70 characters are allowed, got "{}"   "   zAInvalid IBAN, min. 5 and max. 34 characters are allowed, got "{}")      z8Invalid BIC, should be 8 or 11 characters long, got "{}"z3Invalid purpose, 4 characters are allowed, got "{}"zBInvalid amount, must be in bigger or equal {} and less or equal {}BCD002r<   SCTz	EUR{:.2f}rs   rt   
   )startiK  z8Payload is too big: Max. 331 bytes allowed, got {} bytes)decimalDecimalru   stripr0   r   indexlowerr_   r   intlenr?   rD   	enumerater   UnicodeEncodeError)r-   ibanamounttext	referencebicpurposeencoding	encodings
min_amount
max_amounttmp_datar   charsetidxencs                   r   _make_epc_qr_datar     s   KI((J00J *4;;===dD&/>	  """YI
%#))+++#C)4::<<<TDh$$ 	kg$??8>>+;+;<<q@ g g g !I!P!PQY[d!e!efffgHc** 	k!x2Q2Q2Q2Q3y>>2Q2Q2Q2QX__`hiijjj _	 _T _i _]^^^ 2AD		((((S((((RYYZ]^bZcZcddeee	 21s9~~33333333k &Y002 2 	2|1s4yy....B....QXXY]^^___|1s4yy....B....\ccdhiijjj
 as3xxw&&SZZ[^__``` `3w<<1$$NUUV]^^____V$$F----:----] &Z88: : 	:	r""6**11#66==cBB2R
H  99XD$bb(G{{!)ABB-q999 	 	HCC   %   {{g,,HQK99X%%i!&<==D
4yy3SZZ[^_c[d[deefffKs   #*C .C<O00
O=<O=c                     t          j        t          | |||||||          dd          }|j        dk    r't	          d                    |j                            |S )a      Creates and returns an European Payments Council Quick Response Code
    (EPC QR Code) version 002.

    The returned :py:class:`segno.QRCode` uses always the error correction level
    "M" and utilizes max. version 13 to fulfill the constraints of the EPC QR
    Code standard.

    .. note::

        Either the ``text`` or ``reference`` must be provided but not both

    .. note::

        Neither the IBAN, BIC, nor remittance reference number or any other
        information is validated (aside from checks regarding the allowed string
        lengths).

    :param str name: Name of the recipient.
    :param str iban: International Bank Account Number (IBAN)
    :param amount: The amount (in EUR) to transfer.
            The currency is always Euro, no other currencies are supported.
    :type amount: int, float, decimal.Decimal
    :param str text: Remittance Information (unstructured)
    :param str reference: Remittance Information (structured)
    :param str bic: Bank Identifier Code (BIC). Optional, only required
                for non-EEA countries.
    :param str purpose: SEPA purpose code.
    :param encoding: By default, this function tries to find the best,
                minimal encoding. If another encoding should be used, the encoding
                name or the encoding constant (an integer) can be provided:
                ``1``: "UTF-8", ``2``: "ISO 8859-1", ``3``: "ISO 8859-2",
                ``4``: "ISO 8859-4", ``5``: "ISO 8859-5", ``6``: "ISO 8859-7",
                ``7``: "ISO 8859-10", ``8``: "ISO 8859-15"

                The encoding is case-insensitive.
    :type encoding: str or int
    :rtype: segno.QRCode
    mF)errorboost_error   zAInvalid EPC QR Code, max. QR Code version 13 is allowed, got "{}")r"   r#   r   versionr_   r   
designator)	r-   r   r   r   r   r   r   r   qrs	            r   make_epc_qrr   [  ss    V 
(tVT9),gxA A e
5 
5 
5B 
zB\ccdfdqrrsssIr   )NNF)NNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNNNNNNNN)NNNN)NNNNN)__doc__rer   r"   urllib.parser   ordr   r   r   r   r    r$   rV   rX   compilematchr^   rn   rp   rx   rz   r   r   r   r   r'   r   r   <module>r      sA  	 	 
			         CIIvCHHeCHHeCHHe	 CHHeCHHe, , ,+ + +   4K K K K$ MQBFAE<@G G G GT HLIMAE&*0< 0< 0< 0<f "rz"ghhn  DHHLIMHLAE>By y y yx ?CCGDHCG<@9=O? O? O? O?d: : :	2 	2 	2& & & &RK K K K* JN-1L L L L^ DH'+1 1 1 1 1 1r   