%%
%% This is file `l3backend-xetex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% l3backend-basics.dtx  (with options: `package,xetex')
%% l3backend-color.dtx  (with options: `package,xetex')
%% l3backend-box.dtx  (with options: `package,xetex')
%% l3backend-draw.dtx  (with options: `package,xetex')
%% l3backend-graphics.dtx  (with options: `package,xetex')
%% l3backend-pdf.dtx  (with options: `package,xetex')
%% l3backend-opacity.dtx  (with options: `package,xetex')
%% 
%% Copyright (C) 2019-2021 The LaTeX Project
%% 
%% It may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License (LPPL), either version 1.3c of
%% this license or (at your option) any later version.  The latest
%% version of this license is in the file:
%% 
%%    https://www.latex-project.org/lppl.txt
%% 
%% This file is part of the "l3backend bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%% 
%% File: l3backend-basics.dtx
\ProvidesExplFile
  {l3backend-xetex.def}{2021-08-04}{}
  {L3 backend support: XeTeX}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
  {
    \__kernel_dependency_version_check:nn {2021-02-18}
      {l3backend-xetex.def}
  }
  {
    \cs_if_exist_use:cF { @latex@error } { \errmessage }
      {
        Mismatched~LaTeX~support~files~detected. \MessageBreak
        Loading~aborted!
      }
      { \use:c { @ehd } }
    \tex_endinput:D
  }
\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
\cs_new_protected:Npn \__kernel_backend_literal:n #1
  { \__kernel_backend_literal:e { \exp_not:n {#1} } }
\cs_generate_variant:Nn \__kernel_backend_literal:n { x }
\cs_if_exist:NTF \@ifl@t@r
  {
    \@ifl@t@r \fmtversion { 2020-10-01 }
      {
        \cs_new_protected:Npn \__kernel_backend_first_shipout:n #1
          { \hook_gput_code:nnn { shipout / firstpage } { l3backend } {#1} }
      }
      { \cs_new_eq:NN \__kernel_backend_first_shipout:n \AtBeginDvi }
  }
  { \cs_new_eq:NN \__kernel_backend_first_shipout:n \use:n }
\cs_new_protected:Npn \__kernel_backend_literal_pdf:n #1
  { \__kernel_backend_literal:n { pdf:literal~ #1 } }
\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x }
\cs_new_protected:Npn \__kernel_backend_literal_page:n #1
  { \__kernel_backend_literal:n { pdf:literal~direct~ #1 } }
\cs_new_protected:Npn \__kernel_backend_scope_begin:
  { \__kernel_backend_literal:n { x:gsave } }
\cs_new_protected:Npn \__kernel_backend_scope_end:
  { \__kernel_backend_literal:n { x:grestore } }
\group_begin:
  \cs_set:Npn \__sys_tmp:w #1 Version ~ #2 ~ #3 \q_stop {#2}
  \sys_get_shell:nnNTF { extractbb~--version }
    { \char_set_catcode_space:n { `\  } }
    \l__sys_internal_tl
    {
      \int_const:Nn \c__kernel_sys_dvipdfmx_version_int
        {
          \exp_after:wN \__sys_tmp:w \l__sys_internal_tl
            \q_stop
        }
    }
    { \int_const:Nn \c__kernel_sys_dvipdfmx_version_int { 0 } }
\group_end:
%% File: l3backend-color.dtx
\cs_new_protected:Npn \__color_backend_pickup:N #1 { }
\cs_if_exist:cT { ver@color.sty }
  {
    \cs_set_protected:Npn \__color_backend_pickup:N #1
      {
        \exp_args:NV \tl_if_head_is_space:nTF \current@color
          {
            \tl_set:Nx #1
               {
                 { \exp_after:wN \use:n \current@color }
                 { 1 }
               }
          }
          {
            \exp_last_unbraced:Nx \__color_backend_pickup:w
              { \current@color } \s__color_stop #1
          }
      }
    \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
      { \tl_set:Nn #3 { {#1} {#2} } }
  }
\int_new:N \l__color_backend_stack_int
\int_compare:nNnTF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
  { \cs_new_protected:Npn \__kernel_color_backend_stack_init:Nnn #1#2#3 { } }
  {
    \int_new:N \g__color_backend_stack_int
    \cs_new_protected:Npx \__kernel_color_backend_stack_init:Nnn #1#2#3
      {
        \int_gincr:N \exp_not:N \g__color_backend_stack_int
        \int_const:Nn #1 { \exp_not:N \g__color_backend_stack_int }
        \use:x
          {
            \__kernel_backend_first_shipout:n
              {
                \__kernel_backend_literal:n
                  {
                    pdfcolorstackinit ~
                    \exp_not:N \int_use:N \exp_not:N \g__color_backend_stack_int
                    \c_space_tl
                    \exp_not:N \tl_if_blank:nF {#2} { #2 ~ }
                    (#3)
                  }
              }
          }
      }
    \cs_if_exist:cTF { main@pdfcolorstack }
      {
        \int_set:Nn \l__color_backend_stack_int
          { \int_use:c { main@pdfcolorstack } }
      }
      {
        \__kernel_color_backend_stack_init:Nnn \c__color_backend_main_stack_int
          { page ~ direct } { 0 ~ g ~ 0 ~ G }
        \int_set_eq:NN \l__color_backend_stack_int
          \c__color_backend_main_stack_int
        \int_const:cn { main@pdfcolorstack } { \c__color_backend_main_stack_int }
      }
    \cs_gset_protected:Npn \__kernel_backend_scope_end:
      {
        \__kernel_backend_literal:n { x:grestore }
        \__kernel_backend_literal:n
          { pdfcolorstack ~ \g__color_backend_stack_int current }
      }
  }
\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
  {
    \cs_new_protected:Npn \__kernel_color_backend_stack_push:nn #1#2
      {
        \__kernel_backend_literal:x
          {
            pdfcolorstack ~
            \int_eval:n {#1} ~
            push ~ (#2)
          }
      }
    \cs_generate_variant:Nn \__kernel_color_backend_stack_push:nn { nx }
    \cs_new_protected:Npn \__kernel_color_backend_stack_pop:n #1
      {
        \__kernel_backend_literal:x
          {
            pdfcolorstack ~
            \int_eval:n {#1} ~
            pop
          }
      }
  }
\tl_new:N \l__color_backend_fill_tl
\tl_new:N \l__color_backend_stroke_tl
\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
  { \__color_backend_select:nn { #1 ~ k } { #1 ~ K } }
\cs_new_protected:Npn \__color_backend_select_gray:n #1
  { \__color_backend_select:nn { #1 ~ g } { #1 ~ G } }
\cs_new_protected:Npn \__color_backend_select_rgb:n #1
  { \__color_backend_select:nn { #1 ~ rg } { #1 ~ RG } }
\cs_new_protected:Npn \__color_backend_select:nn #1#2
  {
    \tl_set:Nn \l__color_backend_fill_tl {#1}
    \tl_set:Nn \l__color_backend_stroke_tl {#2}
    \__kernel_color_backend_stack_push:nn \l__color_backend_stack_int { #1 ~ #2 }
    \group_insert_after:N \__color_backend_reset:
  }
\cs_new_protected:Npn \__color_backend_reset:
  { \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int }
\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
  {
    \cs_gset_protected:Npn \__color_backend_select_cmyk:n #1
      {
        \__kernel_backend_literal:n { pdf: bc ~ [#1] }
        \group_insert_after:N \__color_backend_reset:
      }
    \cs_gset_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n
    \cs_gset_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n
    \cs_gset_protected:Npn \__color_backend_reset:
      { \__kernel_backend_literal:n { pdf: ec } }
  }
\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
  { \__color_backend_select:nn { /#1 ~ cs ~ #2 ~ scn  } { /#1 ~ CS ~ #2 ~ SCN } }
\cs_new_eq:NN \__color_backend_select_devicen:nn \__color_backend_select_separation:nn
\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
  {
    \pdf_object_unnamed_write:nx { dict }
      {
        /FunctionType ~ 2
        /Domain ~ [0 ~ 1]
        \tl_if_blank:nF {#3} { /Range ~ [#3] }
        /C0 ~ [#4] ~
        /C1 ~ [#5] /N ~ 1
      }
    \__color_backend_separation_init:n
      {
        /Separation ~
        / \str_convert_pdfname:n {#1} ~ #2 ~
        \pdf_object_ref_last:
      }
    \bool_lazy_and:nnT
      { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
      { \pdfmanagement_if_active_p:}
      {
        \use:x
          {
            \pdfmanagement_add:nnn
              { Page / Resources / ColorSpace }
              { color \int_use:N \g__color_model_int }
              { \pdf_object_ref_last: }
          }
      }
  }
\cs_new_protected:Npn \__color_backend_separation_init:n #1
  {
    \pdf_object_unnamed_write:nx { array } {#1}
  }
\cs_new_protected:Npn \__color_backend_separation_init_CIELAB:nnn #1#2#3
  {
    \pdf_object_if_exist:nF { __color_illuminant_CIELAB_ #1 }
      {
        \pdf_object_new:nn { __color_illuminant_CIELAB_ #1 } { array }
        \pdf_object_write:nx { __color_illuminant_CIELAB_ #1 }
          {
            /Lab ~
            <<
             /WhitePoint ~
               [ \tl_use:c { c__color_model_whitepoint_CIELAB_ #1 _tl } ]
             /Range ~ [ \c__color_model_range_CIELAB_tl ]
            >>
          }
      }
    \__color_backend_separation_init:nnnnn
      {#2}
      { \pdf_object_ref:n { __color_illuminant_CIELAB_ #1 } }
      { \c__color_model_range_CIELAB_tl }
      { 100 ~ 0 ~ 0 }
      {#3}
  }
\cs_new_protected:Npn \__color_backend_devicen_init:nnn #1#2#3
  {
    \pdf_object_unnamed_write:nx { stream }
      {
        {
          /FunctionType ~ 4 ~
          /Domain ~
            [ ~
              \prg_replicate:nn
                { 0 \__color_backend_devicen_init:w #1 ~ \s__color_stop }
                { 0 ~ 1 ~ } ~
            ] ~
          /Range ~
            [ ~
              \str_case:nn {#2}
                {
                  { /DeviceCMYK } { 0 ~ 1 ~ 0 ~ 1 ~ 0 ~ 1 ~ 0 ~ 1 }
                  { /DeviceGray } { 0 ~ 1 }
                  { /DeviceRGB }  { 0 ~ 1 ~ 0 ~ 1 ~ 0 ~ 1 }
                } ~
            ]
        }
        {#3}
     }
    \__color_backend_separation_init:n
      {
        /DeviceN ~
        [ ~ #1 ~ ] ~
        #2 ~
        \pdf_object_ref_last:
      }
    \bool_lazy_and:nnT
      { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
      { \pdfmanagement_if_active_p:}
      {
        \use:x
          {
            \pdfmanagement_add:nnn
              { Page / Resources / ColorSpace }
              { color \int_use:N \g__color_model_int }
              { \pdf_object_ref_last: }
          }
      }
  }
\cs_new:Npn \__color_backend_devicen_init:w #1 ~ #2 \s__color_stop
  {
    + 1
    \tl_if_blank:nF {#2}
      { \__color_backend_devicen_init:w #2 \s__color_stop }
  }
\cs_new_eq:NN \__color_backend_devicen_init:n \__color_backend_separation_init:n
\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
  {
    \cs_gset_protected:Npn \__color_backend_select_separation:nn #1#2 { }
    \cs_gset_eq:NN \__color_backend_select_devicen:nn
      \__color_backend_select_separation:nn
  }
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
  { \__color_backend_fill:n { #1 ~ k } }
\cs_new_protected:Npn \__color_backend_fill_gray:n #1
  { \__color_backend_fill:n { #1 ~ g } }
\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
  { \__color_backend_fill:n { #1 ~ rg } }
\cs_new_protected:Npn \__color_backend_fill:n #1
  {
    \tl_set:Nn \l__color_backend_fill_tl {#1}
    \__kernel_color_backend_stack_push:nn \l__color_backend_stack_int
      { #1 ~ \l__color_backend_stroke_tl }
    \group_insert_after:N \__color_backend_reset:
  }
\cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
  { \__color_backend_stroke:n { #1 ~ K } }
\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
  { \__color_backend_stroke:n { #1 ~ G } }
\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
  { \__color_backend_stroke:n { #1 ~ RG } }
\cs_new_protected:Npn \__color_backend_stroke:n #1
  {
    \tl_set:Nn \l__color_backend_stroke_tl {#1}
    \__kernel_color_backend_stack_push:nn \l__color_backend_stack_int
      { \l__color_backend_fill_tl \c_space_tl #1 }
    \group_insert_after:N \__color_backend_reset:
  }
\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
  { \__color_backend_fill:n { /#1 ~ cs ~ #2 ~ scn } }
\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
  { \__color_backend_stroke:n { /#1 ~ CS ~ #2 ~ SCN } }
\cs_new_eq:NN \__color_backend_fill_devicen:nn \__color_backend_fill_separation:nn
\cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn
\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
  {
    \cs_gset_protected:Npn \__color_backend_fill_cmyk:n #1
      {
        \__kernel_backend_literal:n { pdf: bc ~ [#1] }
        \group_insert_after:N \__color_backend_reset:
      }
    \cs_gset_eq:NN \__color_backend_fill_gray:n \__color_backend_fill_cmyk:n
    \cs_gset_eq:NN \__color_backend_fill_rgb:n \__color_backend_fill_cmyk:n
    \cs_gset_protected:Npn \__color_backend_reset:
      { \__kernel_backend_literal:n { pdf: ec } }
    \cs_gset_protected:Npn \__color_backend_stroke:n #1
      { \__kernel_backend_literal:n {#1} }
    \cs_gset_protected:Npn \__color_backend_fill_separation:nn #1#2 { }
    \cs_gset_eq:NN \__color_backend_fill_devicen:nn
      \__color_backend_fill_separation:nn
    \cs_gset_eq:NN \__color_backend_stroke_separation:nn
      \__color_backend_fill_separation:nn
    \cs_gset_eq:NN \__color_backend_stroke_devicen:nn
      \__color_backend_stroke_separation:nn
  }
%% File: l3backend-box.dtx
\cs_new_protected:Npn \__box_backend_clip:N #1
  {
    \__kernel_backend_scope_begin:
    \__kernel_backend_literal_pdf:x
      {
        0~
        \dim_to_decimal_in_bp:n { -\box_dp:N #1 } ~
        \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~
        \dim_to_decimal_in_bp:n { \box_ht:N #1 + \box_dp:N #1 } ~
        re~W~n
      }
    \hbox_overlap_right:n { \box_use:N #1 }
    \__kernel_backend_scope_end:
    \skip_horizontal:n { \box_wd:N #1 }
  }
\cs_new_protected:Npn \__box_backend_rotate:Nn #1#2
  { \exp_args:NNf \__box_backend_rotate_aux:Nn #1 { \fp_eval:n {#2} } }
\cs_new_protected:Npn \__box_backend_rotate_aux:Nn #1#2
  {
    \__kernel_backend_scope_begin:
    \__kernel_backend_literal:x
      {
        x:rotate~
        \fp_compare:nNnTF {#2} = \c_zero_fp
          { 0 }
          { \fp_eval:n { round ( #2 , 5 ) } }
      }
    \box_use:N #1
    \__kernel_backend_scope_end:
  }
\cs_new_protected:Npn \__box_backend_scale:Nnn #1#2#3
  {
    \__kernel_backend_scope_begin:
    \__kernel_backend_literal:x
      {
        x:scale~
        \fp_eval:n { round ( #2 , 5 ) } ~
        \fp_eval:n { round ( #3 , 5 ) }
      }
    \hbox_overlap_right:n { \box_use:N #1 }
    \__kernel_backend_scope_end:
  }
%% File: l3backend-draw.dtx
\cs_new_eq:NN \__draw_backend_literal:n \__kernel_backend_literal_pdf:n
\cs_generate_variant:Nn \__draw_backend_literal:n { x }
\cs_new_protected:Npn \__draw_backend_begin:
  { \__draw_backend_scope_begin: }
\cs_new_protected:Npn \__draw_backend_end:
  { \__draw_backend_scope_end: }
\cs_new_eq:NN \__draw_backend_scope_begin: \__kernel_backend_scope_begin:
\cs_new_eq:NN \__draw_backend_scope_end: \__kernel_backend_scope_end:
\cs_new_protected:Npn \__draw_backend_moveto:nn #1#2
  {
    \__draw_backend_literal:x
      { \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ m }
  }
\cs_new_protected:Npn \__draw_backend_lineto:nn #1#2
  {
    \__draw_backend_literal:x
      { \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ l }
  }
\cs_new_protected:Npn \__draw_backend_curveto:nnnnnn #1#2#3#4#5#6
  {
    \__draw_backend_literal:x
      {
        \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
        \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~
        \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~
        c
      }
 }
\cs_new_protected:Npn \__draw_backend_rectangle:nnnn #1#2#3#4
  {
     \__draw_backend_literal:x
      {
        \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
        \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~
        re
      }
  }
\cs_new_protected:Npn \__draw_backend_evenodd_rule:
  { \bool_gset_true:N \g__draw_draw_eor_bool }
\cs_new_protected:Npn \__draw_backend_nonzero_rule:
  { \bool_gset_false:N \g__draw_draw_eor_bool }
\bool_new:N \g__draw_draw_eor_bool
\cs_new_protected:Npn \__draw_backend_closepath:
  { \__draw_backend_literal:n { h } }
\cs_new_protected:Npn \__draw_backend_stroke:
  { \__draw_backend_literal:n { S } }
\cs_new_protected:Npn \__draw_backend_closestroke:
  { \__draw_backend_literal:n { s } }
\cs_new_protected:Npn \__draw_backend_fill:
  {
    \__draw_backend_literal:x
      { f \bool_if:NT \g__draw_draw_eor_bool * }
  }
\cs_new_protected:Npn \__draw_backend_fillstroke:
  {
    \__draw_backend_literal:x
      { B \bool_if:NT \g__draw_draw_eor_bool * }
  }
\cs_new_protected:Npn \__draw_backend_clip:
  {
    \__draw_backend_literal:x
      { W \bool_if:NT \g__draw_draw_eor_bool * }
  }
\cs_new_protected:Npn \__draw_backend_discardpath:
  { \__draw_backend_literal:n { n } }
\cs_new_protected:Npn \__draw_backend_dash_pattern:nn #1#2
  {
    \__draw_backend_literal:x
      {
        [
          \exp_args:Nf \use:n
            { \clist_map_function:nN {#1} \__draw_backend_dash:n }
        ] ~
        \dim_to_decimal_in_bp:n {#2} ~ d
      }
  }
\cs_new:Npn \__draw_backend_dash:n #1
  { ~ \dim_to_decimal_in_bp:n {#1} }
\cs_new_protected:Npn \__draw_backend_linewidth:n #1
  {
    \__draw_backend_literal:x
      { \dim_to_decimal_in_bp:n {#1} ~ w }
  }
\cs_new_protected:Npn \__draw_backend_miterlimit:n #1
  { \__draw_backend_literal:x { #1 ~ M } }
\cs_new_protected:Npn \__draw_backend_cap_butt:
  { \__draw_backend_literal:n { 0 ~ J } }
\cs_new_protected:Npn \__draw_backend_cap_round:
  { \__draw_backend_literal:n { 1 ~ J } }
\cs_new_protected:Npn \__draw_backend_cap_rectangle:
  { \__draw_backend_literal:n { 2 ~ J } }
\cs_new_protected:Npn \__draw_backend_join_miter:
  { \__draw_backend_literal:n { 0 ~ j } }
\cs_new_protected:Npn \__draw_backend_join_round:
  { \__draw_backend_literal:n { 1 ~ j } }
\cs_new_protected:Npn \__draw_backend_join_bevel:
  { \__draw_backend_literal:n { 2 ~ j } }
\cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
  {
    \__draw_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4}
      \__draw_backend_cm_aux:nnnn
  }
\cs_new_protected:Npn \__draw_backend_cm_aux:nnnn #1#2#3#4
  {
    \__kernel_backend_literal:x
      {
        x:rotate~
        \fp_compare:nNnTF {#1} = \c_zero_fp
          { 0 }
          { \fp_eval:n { round ( -#1 , 5 ) } }
      }
    \__kernel_backend_literal:x
      {
        x:scale~
        \fp_eval:n { round ( #2 , 5 ) } ~
        \fp_eval:n { round ( #3 , 5 ) }
      }
    \__kernel_backend_literal:x
      {
        x:rotate~
        \fp_compare:nNnTF {#4} = \c_zero_fp
          { 0 }
          { \fp_eval:n { round ( -#4 , 5 ) } }
      }
  }
\cs_new_protected:Npn \__draw_backend_cm_decompose:nnnnN #1#2#3#4#5
  {
    \use:x
      {
        \__draw_backend_cm_decompose_auxi:nnnnN
          { \fp_eval:n { (#1 + #4) / 2 } }
          { \fp_eval:n { (#1 - #4) / 2 } }
          { \fp_eval:n { (#3 + #2) / 2 } }
          { \fp_eval:n { (#3 - #2) / 2 } }
      }
        #5
  }
\cs_new_protected:Npn \__draw_backend_cm_decompose_auxi:nnnnN #1#2#3#4#5
  {
    \use:x
      {
        \__draw_backend_cm_decompose_auxii:nnnnN
          { \fp_eval:n { 2 * sqrt ( #1 * #1 + #4 * #4 ) } }
          { \fp_eval:n { 2 * sqrt ( #2 * #2 + #3 * #3 ) } }
          { \fp_eval:n { atand ( #3 , #2 ) } }
          { \fp_eval:n { atand ( #4 , #1 ) } }
      }
         #5
  }
\cs_new_protected:Npn \__draw_backend_cm_decompose_auxii:nnnnN #1#2#3#4#5
  {
    \use:x
      {
        \__draw_backend_cm_decompose_auxiii:nnnnN
          { \fp_eval:n { ( #4 - #3 ) / 2 } }
          { \fp_eval:n { ( #1 + #2 ) / 2 } }
          { \fp_eval:n { ( #1 - #2 ) / 2 } }
          { \fp_eval:n { ( #4 + #3 ) / 2 } }
      }
        #5
  }
\cs_new_protected:Npn \__draw_backend_cm_decompose_auxiii:nnnnN #1#2#3#4#5
  {
    \fp_compare:nNnTF { abs( #2 ) } > { abs ( #3 ) }
      { #5 {#1} {#2} {#3} {#4} }
      { #5 {#1} {#3} {#2} {#4} }
  }
\cs_new_protected:Npn \__draw_backend_box_use:Nnnnn #1#2#3#4#5
  {
    \__kernel_backend_scope_begin:
    \__kernel_backend_literal:n
      { pdf:btrans~matrix~ #2 ~ #3 ~ #4 ~ #5 ~ 0 ~ 0 }
    \hbox_overlap_right:n { \box_use:N #1 }
    \__kernel_backend_literal:n { pdf:etrans }
    \__kernel_backend_scope_end:
  }
%% File: l3backend-graphics.dtx
\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n
\int_new:N \g__graphics_track_int
\cs_new_protected:Npn \__graphics_backend_include_eps:n #1
  {
    \__kernel_backend_literal:x
      {
        PSfile = #1 \c_space_tl
        llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl
        lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl
        urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl
        ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim
      }
  }
\cs_new_protected:Npn \__graphics_backend_include_jpg:n #1
  { \__graphics_backend_include_auxi:nn {#1} { image } }
\cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n
\cs_new_protected:Npn \__graphics_backend_include_auxi:nn #1#2
  {
    \__graphics_backend_include_auxii:xnn
      {
        \tl_if_empty:NF \l_graphics_pagebox_tl
          { : \l_graphics_pagebox_tl }
        \int_compare:nNnT \l_graphics_page_int > 1
          { :P \int_use:N \l_graphics_page_int }
        \tl_if_empty:NF \l_graphics_decodearray_tl
          { :D \l_graphics_decodearray_tl }
        \bool_if:NT \l_graphics_interpolate_bool
           { :I }
      }
      {#1} {#2}
  }
\cs_new_protected:Npn \__graphics_backend_include_auxii:nnn #1#2#3
  {
    \int_if_exist:cTF { c__graphics_graphics_ #2#1 _int }
      {
        \__kernel_backend_literal:x
          { pdf:usexobj~@graphic \int_use:c { c__graphics_graphics_ #2#1 _int } }
      }
      { \__graphics_backend_include_auxiii:nnn {#2} {#1} {#3} }
  }
\cs_generate_variant:Nn \__graphics_backend_include_auxii:nnn { x }
\cs_new_protected:Npn \__graphics_backend_include_auxiii:nnn #1#2#3
  {
    \int_gincr:N \g__graphics_track_int
    \int_const:cn { c__graphics_graphics_ #1#2 _int } { \g__graphics_track_int }
    \__kernel_backend_literal:x
      {
        pdf:#3~
        @graphic \int_use:c { c__graphics_graphics_ #1#2 _int } ~
        \int_compare:nNnT \l_graphics_page_int > 1
          { page ~ \int_use:N \l_graphics_page_int \c_space_tl }
        \tl_if_empty:NF \l_graphics_pagebox_tl
          {
            pagebox ~ \l_graphics_pagebox_tl \c_space_tl
            bbox ~
              \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl
              \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl
              \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl
              \dim_to_decimal_in_bp:n \l_graphics_ury_dim \c_space_tl
          }
        (#1)
        \bool_lazy_or:nnT
          { \l_graphics_interpolate_bool }
          { ! \tl_if_empty_p:N \l_graphics_decodearray_tl }
          {
            <<
              \tl_if_empty:NF \l_graphics_decodearray_tl
                { /Decode~[ \l_graphics_decodearray_tl ] }
              \bool_if:NT \l_graphics_interpolate_bool
                { /Interpolate~true> }
            >>
          }
      }
  }
\cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
  {
    \int_zero:N \l_graphics_page_int
    \tl_clear:N \l_graphics_pagebox_tl
    \__graphics_backend_getbb_auxi:nN {#1} \tex_XeTeXpicfile:D
  }
\cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n
\cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1
  {
    \tl_clear:N \l_graphics_decodearray_tl
    \bool_set_false:N \l_graphics_interpolate_bool
    \__graphics_backend_getbb_auxi:nN {#1} \tex_XeTeXpdffile:D
  }
\cs_new_protected:Npn \__graphics_backend_getbb_auxi:nN #1#2
  {
    \int_compare:nNnTF \l_graphics_page_int > 1
      { \__graphics_backend_getbb_auxii:VnN \l_graphics_page_int {#1} #2  }
      { \__graphics_backend_getbb_auxiii:nNnn {#1} #2 { :P 1 } { page 1 } }
  }
\cs_new_protected:Npn \__graphics_backend_getbb_auxii:nnN #1#2#3
  { \__graphics_backend_getbb_auxiii:nNnn {#2} #3 { :P #1 } { page #1 } }
\cs_generate_variant:Nn \__graphics_backend_getbb_auxii:nnN { V }
\cs_new_protected:Npn \__graphics_backend_getbb_auxiii:nNnn #1#2#3#4
  {
    \tl_if_empty:NTF \l_graphics_pagebox_tl
      { \__graphics_backend_getbb_auxiv:VnNnn \l_graphics_pagebox_tl }
      { \__graphics_backend_getbb_auxv:nNnn }
      {#1} #2 {#3} {#4}
  }
\cs_new_protected:Npn \__graphics_backend_getbb_auxiv:nnNnn #1#2#3#4#5
  {
    \use:x
      {
        \__graphics_backend_getbb_auxv:nNnn {#2} #3 { : #1 #4 }
          { #5 ~ \__graphics_backend_getbb_pagebox:w #1 }
      }
  }
\cs_generate_variant:Nn \__graphics_backend_getbb_auxiv:nnNnn { V }
\cs_new_protected:Npn \__graphics_backend_getbb_auxv:nNnn #1#2#3#4
  {
    \graphics_bb_restore:nF {#1#3}
      { \__graphics_backend_getbb_auxvi:nNnn {#1} #2 {#3} {#4} }
  }
\cs_new_protected:Npn \__graphics_backend_getbb_auxvi:nNnn #1#2#3#4
  {
    \hbox_set:Nn \l__graphics_internal_box { #2 #1 ~ #4 }
    \dim_set:Nn \l_graphics_urx_dim { \box_wd:N \l__graphics_internal_box }
    \dim_set:Nn \l_graphics_ury_dim { \box_ht:N \l__graphics_internal_box }
    \graphics_bb_save:n {#1#3}
  }
\cs_new:Npn \__graphics_backend_getbb_pagebox:w #1 box {#1}
\cs_new_protected:Npn \__graphics_backend_include_pdf:n #1
  {
    \tex_XeTeXpdffile:D
      \__graphics_backend_include_pdf_quote:w #1 "#1" \s__graphics_stop \c_space_tl
      \int_compare:nNnT \l_graphics_page_int > 0
        { page ~ \int_use:N \l_graphics_page_int \c_space_tl }
        \exp_after:wN \__graphics_backend_getbb_pagebox:w \l_graphics_pagebox_tl
  }
\cs_new:Npn \__graphics_backend_include_pdf_quote:w #1 " #2 " #3 \s__graphics_stop
  { " #2 " }
%% File: l3backend-pdf.dtx
\box_new:N \l__pdf_internal_box
\cs_new_protected:Npx \__pdf_backend:n #1
  { \__kernel_backend_literal:n { pdf: #1 } }
\cs_generate_variant:Nn \__pdf_backend:n { x }
\cs_new_protected:Npn \__pdf_backend_catalog_gput:nn #1#2
  { \__pdf_backend:n { put ~ @catalog << /#1 ~ #2 >> } }
\cs_new_protected:Npn \__pdf_backend_info_gput:nn #1#2
  { \__pdf_backend:n { docinfo << /#1 ~ #2 >> } }
\int_new:N \g__pdf_backend_object_int
\prop_new:N \g__pdf_backend_object_prop
\cs_new_protected:Npn \__pdf_backend_object_new:nn #1#2
  {
    \int_gincr:N \g__pdf_backend_object_int
    \int_const:cn
      { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
      { \g__pdf_backend_object_int }
    \prop_gput:Nnn \g__pdf_backend_object_prop {#1} {#2}
  }
\cs_new:Npn \__pdf_backend_object_ref:n #1
  { @pdf.obj \int_use:c { c__pdf_backend_object_ \tl_to_str:n {#1} _int } }
\cs_new_protected:Npn \__pdf_backend_object_write:nn #1#2
  {
    \exp_args:Nx \__pdf_backend_object_write:nnn
      { \prop_item:Nn \g__pdf_backend_object_prop {#1} } {#1} {#2}
  }
\cs_generate_variant:Nn \__pdf_backend_object_write:nn { nx }
\cs_new_protected:Npn \__pdf_backend_object_write:nnn #1#2#3
  {
    \use:c { __pdf_backend_object_write_ #1 :nn }
      { \__pdf_backend_object_ref:n {#2} } {#3}
  }
\cs_new_protected:Npn \__pdf_backend_object_write_array:nn #1#2
  {
    \__pdf_backend:x
      { obj ~ #1 ~ [ ~ \exp_not:n {#2} ~ ] }
  }
\cs_new_protected:Npn \__pdf_backend_object_write_dict:nn #1#2
  {
    \__pdf_backend:x
      { obj ~ #1 ~ << ~ \exp_not:n {#2} ~ >> }
  }
\cs_new_protected:Npn \__pdf_backend_object_write_fstream:nn #1#2
  { \__pdf_backend_object_write_stream:nnnn { f } {#1} #2 }
\cs_new_protected:Npn \__pdf_backend_object_write_stream:nn #1#2
  { \__pdf_backend_object_write_stream:nnnn { } {#1} #2 }
\cs_new_protected:Npn \__pdf_backend_object_write_stream:nnnn #1#2#3#4
  {
    \__pdf_backend:x
      {
        #1 stream ~ #2 ~
          ( \exp_not:n {#4} ) ~ << \exp_not:n {#3} >>
      }
  }
\cs_new_protected:Npn \__pdf_backend_object_now:nn #1#2
  {
    \int_gincr:N \g__pdf_backend_object_int
    \exp_args:Nnx \use:c { __pdf_backend_object_write_ #1 :nn }
      { @pdf.obj \int_use:N \g__pdf_backend_object_int }
      {#2}
  }
\cs_generate_variant:Nn \__pdf_backend_object_now:nn { nx }
\cs_new:Npn \__pdf_backend_object_last:
 { @pdf.obj \int_use:N \g__pdf_backend_object_int }
\cs_new:Npn \__pdf_backend_pageobject_ref:n #1
  { @page #1 }
\int_new:N \g__pdf_backend_annotation_int
\cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4
  {
    \int_gincr:N \g__pdf_backend_object_int
    \int_gset_eq:NN \g__pdf_backend_annotation_int \g__pdf_backend_object_int
    \__pdf_backend:x
      {
        ann ~ @pdf.obj \int_use:N \g__pdf_backend_object_int \c_space_tl
        width  ~ \dim_eval:n {#1} ~
        height ~ \dim_eval:n {#2} ~
        depth  ~ \dim_eval:n {#3} ~
        << /Type /Annot #4 >>
      }
  }
\cs_new:Npn \__pdf_backend_annotation_last:
 { @pdf.obj \int_use:N \g__pdf_backend_annotation_int }
\int_new:N \g__pdf_backend_link_int
\cs_new_protected:Npn \__pdf_backend_link_begin_goto:nnw #1#2
  { \__pdf_backend_link_begin:n { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } }
\cs_new_protected:Npn \__pdf_backend_link_begin_user:nnw #1#2
  { \__pdf_backend_link_begin:n {#1#2} }
\cs_new_protected:Npx \__pdf_backend_link_begin:n #1
  {
    \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
      {
        \exp_not:N \int_gincr:N \exp_not:N  \g__pdf_backend_link_int
      }
    \__pdf_backend:x
      {
         bann ~
         \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
           {
             @pdf.lnk
             \exp_not:N \int_use:N \exp_not:N  \g__pdf_backend_link_int
             \c_space_tl
           }
         <<
           /Type /Annot
           #1
         >>
      }
  }
\cs_new_protected:Npn \__pdf_backend_link_end:
  { \__pdf_backend:n { eann } }
\cs_new:Npx \__pdf_backend_link_last:
  {
    \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
      {
        @pdf.lnk
          \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int
      }
  }
\cs_new_protected:Npn \__pdf_backend_link_margin:n #1
  { \__kernel_backend_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } }
\cs_new_protected:Npn \__pdf_backend_destination:nn #1#2
  {
    \__pdf_backend:x
      {
        dest ~ ( \exp_not:n {#1} )
        [
          @thispage
          \str_case:nnF {#2}
            {
              { xyz }   { /XYZ ~ @xpos ~ @ypos ~ null }
              { fit }   { /Fit }
              { fitb }  { /FitB }
              { fitbh } { /FitBH }
              { fitbv } { /FitBV ~ @xpos }
              { fith }  { /FitH ~ @ypos }
              { fitv }  { /FitV ~ @xpos }
              { fitr }  { /Fit }
            }
            { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
        ]
      }
  }
\cs_new_protected:Npn \__pdf_backend_destination:nnnn #1#2#3#4
  {
    \exp_args:Ne \__pdf_backend_destination_aux:nnnn
      { \dim_eval:n {#2} } {#1} {#3} {#4}
  }
\cs_new_protected:Npn \__pdf_backend_destination_aux:nnnn #1#2#3#4
  {
    \vbox_to_zero:n
      {
        \__kernel_kern:n {#4}
        \hbox:n
          {
            \__pdf_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos }
            \__pdf_backend:n { obj ~ @pdf_ #2 _lly ~ @ypos }
          }
        \tex_vss:D
      }
    \__kernel_kern:n {#1}
    \vbox_to_zero:n
      {
        \__kernel_kern:n { -#3 }
        \hbox:n
          {
            \__pdf_backend:n
              {
                dest ~ (#2)
                [
                  @thispage
                  /FitR ~
                    @pdf_ #2 _llx ~ @pdf_ #2 _lly ~
                    @xpos ~ @ypos
                ]
              }
          }
        \tex_vss:D
      }
    \__kernel_kern:n { -#1 }
  }
\cs_new_protected:Npn \__pdf_backend_compresslevel:n #1
  { \__kernel_backend_literal:x { dvipdfmx:config~z~ \int_eval:n {#1} } }
\cs_new_protected:Npn \__pdf_backend_compress_objects:n #1
  {
    \bool_if:nF {#1}
      { \__kernel_backend_literal:n { dvipdfmx:config~C~0x40 } }
  }
\cs_new_protected:Npn \__pdf_backend_version_major_gset:n #1
  {
    \cs_gset:Npx \__pdf_backend_version_major: { \int_eval:n {#1} }
    \__kernel_backend_literal:x { pdf:majorversion~ \__pdf_backend_version_major: }
  }
\cs_new_protected:Npn \__pdf_backend_version_minor_gset:n #1
  {
    \cs_gset:Npx \__pdf_backend_version_minor: { \int_eval:n {#1} }
    \__kernel_backend_literal:x { pdf:minorversion~ \__pdf_backend_version_minor: }
  }
\cs_new:Npn \__pdf_backend_version_major: { 1 }
\cs_new:Npn \__pdf_backend_version_minor: { 5 }
\cs_new_protected:Npn \__pdf_backend_bdc:nn #1#2
  { \__kernel_backend_literal_page:n { /#1 ~ #2 ~ BDC } }
\cs_new_protected:Npn \__pdf_backend_emc:
  { \__kernel_backend_literal_page:n { EMC } }
%% File: l3backend-opacity.dtx
\bool_lazy_and:nnT
  { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
  { \pdfmanagement_if_active_p:}
  {
    \__kernel_color_backend_stack_init:Nnn \c__opacity_backend_stack_int
      { page ~ direct } { /opacity 1 ~ gs }
    \pdfmanagement_add:nnn { Page / Resources / ExtGState }
      { opacity 1 } { << /ca ~ 1 /CA ~ 1 >> }
  }
\tl_new:N \l__opacity_backend_fill_tl
\tl_new:N \l__opacity_backend_stroke_tl
\cs_new_protected:Npn \__opacity_backend_select:n #1
 {
   \exp_args:Nx \__opacity_backend_select_aux:n
     { \fp_eval:n { min(max(0,#1),1) } }
 }
\cs_new_protected:Npn \__opacity_backend_select_aux:n #1
  {
    \tl_set:Nn \l__opacity_backend_fill_tl {#1}
    \tl_set:Nn \l__opacity_backend_stroke_tl {#1}
    \pdfmanagement_add:nnn { Page / Resources / ExtGState }
      { opacity #1 }
      { << /ca ~ #1 /CA ~ #1 >> }
    \__kernel_color_backend_stack_push:nn \c__opacity_backend_stack_int
      { /opacity #1 ~ gs }
    \group_insert_after:N \__opacity_backend_reset:
  }
\bool_lazy_and:nnF
  { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
  { \pdfmanagement_if_active_p:}
  {
    \cs_gset_protected:Npn \__opacity_backend_select_aux:n #1 { }
  }
\cs_new_protected:Npn \__opacity_backend_reset:
 { \__kernel_color_backend_stack_pop:n \c__opacity_backend_stack_int }
\cs_new_protected:Npn \__opacity_backend_fill:n #1
  {
    \__opacity_backend_fill_stroke:xx
      { \fp_eval:n { min(max(0,#1),1) } }
      \l__opacity_backend_stroke_tl
  }
\cs_new_protected:Npn \__opacity_backend_stroke:n #1
  {
    \__opacity_backend_fill_stroke:xx
      \l__opacity_backend_fill_tl
      { \fp_eval:n { min(max(0,#1),1) } }
  }
\cs_new_protected:Npn \__opacity_backend_fill_stroke:nn #1#2
  {
    \str_if_eq:nnTF {#1} {#2}
      { \__opacity_backend_select_aux:n {#1} }
      {
        \tl_set:Nn \l__opacity_backend_fill_tl {#1}
        \tl_set:Nn \l__opacity_backend_stroke_tl {#2}
        \pdfmanagement_add:nnn { Page / Resources / ExtGState }
          { opacity.fill #1 }
          { << /ca ~ #1 >> }
        \pdfmanagement_add:nnn { Page / Resources / ExtGState }
          { opacity.stroke #1 }
          { << /CA ~ #2 >> }
        \__kernel_color_backend_stack_push:nn \c__opacity_backend_stack_int
         { /opacity.fill #1 ~ gs /opacity.stroke #2 ~ gs }
        \group_insert_after:N \__opacity_backend_reset:
      }
  }
\cs_generate_variant:Nn \__opacity_backend_fill_stroke:nn { xx }
%% 
%%
%% End of file `l3backend-xetex.def'.
